package tiantian_ssm;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import edu.gdut.tiantian.entity.CartItem;
import edu.gdut.tiantian.service.Impl.CartService;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:bean.xml")
public class CartTester {
	
	@Autowired
	private CartService cartDao;
	
	@Test
	public void testFind() {
		String userId = "A7764FF89B884039AC69AFF7C1AD7639";
		List<CartItem> carts = cartDao.getCart(userId);
		for(CartItem cart : carts) {
			System.out.println(cart);
		}
	}
}
